import Vue from 'vue'
import VueRouter from 'vue-router'
// 首页
import Home from '../components/home.vue'

// 购物车
import Mycard from '../components/tabbar/tabbar.vue'

//  地址添加编辑
import AddressEdit from '../components/address/AddressEdit.vue'
//  地址列表
import AddressList from '../components/address/AddressList.vue'
// 修改地址 
import EditTheAddress from '../components/address/EditTheAddress.vue'
// 分类

import Cate from '../components/cate/cate.vue'

// 详情页
import Details from '../components/details/details.vue'
Vue.use(VueRouter)

const routes = [ 
  { path: '/', redirect: '/home' },
  { path: '/home', component: Home },
  { path: '/addressedit', component: AddressEdit },
  { path: '/addresslist', component: AddressList },
  { path: '/edittheaddress', component: EditTheAddress },
  { path: '/details', component: Details },
  { path: '/goods', component: Cate },
  {
    path: '/mycard',
    component: Mycard
  },
  // { path: '/cate', component: Cate }
   {
     path: '/mycard',
     component: Mycard
   }

]
EditTheAddress
const router = new VueRouter({
  routes
})

export default router


